package model;

import exception.GameException;

public class HoldEmTable extends Table
{
	protected HoldEmGame game;
	
	public HoldEmTable(int seats)
	{
		super(seats);
		
		cardStack = new CardStack();
	}

	public void setGame(HoldEmGame game)
	{
		this.game = game;
	}
	
	public HoldEmGame getGame()
	{
		return game;
	}

	protected void refillCardStack()
	{
		cardStack.addCards(Card.newDeck());
	}
	
	protected void startBody() throws GameException
	{
		for (int i = 0; i < 2; i++)
		{
			HoldEmGameRound currentGameRound = new HoldEmGameRound(this);
			
			this.currentGameRound = currentGameRound;
			
			currentGameRound.dispatch();
		}
	}
}
